<include file="Home@Public:header" />
	<div class="row">
		<div class=" col-lg-12 col-md-12 col-xs-12">
			<empty name="cartdata">
				<div class="panel panel-default">
					<div class="panel-body">
						<div class="alert alert-success" role="alert">您的购餐车现在为空呢！</div>
					</div>
				</div>
			<else />
			<form class="form-horizontal" role="form"  method="post" action="{:U('Food/Cart/cartsave')}">
				<div class="panel panel-default">
					<div class="panel-body">
						<div class="progress">
							<div class="progress-bar progress-bar-success" role="progressbar" aria-valuenow="60" aria-valuemin="0" aria-valuemax="100" style="width: 33.3%;">1.浏览菜单</div>
							<div class="progress-bar progress-bar-info" role="progressbar" aria-valuenow="60" aria-valuemin="0" aria-valuemax="100" style="width: 33.3%;">2.提交订单信息</div>
							<div class="progress-bar progress-bar-danger" role="progressbar" aria-valuenow="60" aria-valuemin="0" aria-valuemax="100" style="width: 33.3%;">3.订单提交成功</div>
						</div>

						<table class="table">
							<thead>
								<tr>
									<th>菜品</th>
									<th>数量</th>
									<th>小计</th>
									<th>
										<a href="{:U('Food/Cart/cartclear')}"><span class="glyphicon glyphicon-remove"></span> 清空</a>
									</th>
								</tr>
							</thead>
							<tbody>
								<volist name="cartdata" id="vo">
								<tr>
									<td>{$vo['name']}</td>
									<td>
										<div class="input-group">
											<a class="add" href="{:U('Cart/cartupdate',array('id'=>$vo['rowid'],'status'=>'1'))}">+</a>
											{$vo.qty}
											<a class="add" href="{:U('Cart/cartupdate',array('id'=>$vo['rowid'],'status'=>'0'))}">-</a>
										</div>
									</td>
									<td>￥{$vo['subtotal']}</td>
									<td>
										<a href="{:U('Cart/cartupdate',array('id'=>$vo['rowid']))}" ><i class="glyphicon glyphicon-remove"></i></a>
									</td>
								</tr>
								</volist>
							</tbody>
						</table>
						<hr />
						<p class="pull-right cart-totalpay">
							合计数量：{$total_items}份
							<span class="cart-totalpay">
								合计金额：
								<span>￥{$total}.00</span>
							</span>
						</p>
					</div>
					<div class="panel-body">
						<div class="form-group">
							<div for="inputEmail3" class="col-sm-2 control-label">收餐人：</div>
							<div class="col-sm-5">
								<input type="text" class="form-control" name="oman" value="{$user['nickname']}" placeholder="请输入收餐人姓名">
							</div>
						</div>
						<div class="form-group">
							<div for="inputPassword3" class="col-sm-2 control-label">手机号：</div>
							<div class="col-sm-5">
								<input type="text" class="form-control" name="otel" value="{$user['usertel']}" placeholder="请输入手机号">
							</div>
						</div>
						<div class="form-group">
							<div for="inputEmail3" class="col-sm-2 control-label">地址：</div>
							<div class="col-sm-10">
								<input type="text" class="form-control" name="oaddress" placeholder="请输入地址">
							</div>
						</div>
						<!-- <div class="form-group">
						<div for="inputPassword3" class="col-sm-3 control-label">支付方式</div>
						<div class="col-sm-9">
							<div class="radio">
								<label>
									<input type="radio" name="" id="optionsRadios1" value="1" checked></label>
							</div>
						</div> -->
						
						<div class="form-group">
							<div for="inputEmail3" class="col-sm-2 control-label">送餐时间：</div>

							<div class="col-sm-5">
								<div class="input-group date form_date" data-date="" data-date-format="yyyy-mm-dd  HH:ii p" data-link-field="dtp_input2">
									<input class="form-control" size="16" type="text" placeholder="选择送餐时间,不选为30分钟后"　value="">
									<span class="input-group-addon">
										<span class="glyphicon glyphicon-calendar"></span>
									</span>
								</div>
								<input type="hidden" id="dtp_input2" name="orderdtimes" value="<php>$t=time()+ (30 * 60);echo(date('Y-m-d  H:i',$t));</php>" />
							</div>
						</div>

						<div class="form-group">
							<div for="inputEmail3" class="col-sm-2 control-label">备注：</div>
							<div class="col-sm-10">
								<textarea class="form-control" name="ocontent" rows="1"></textarea>
							</div>
						</div>

						<div class="form-group">
							<div class="col-sm-offset-2 col-sm-10">
								<button type="submit" class="btn btn-danger">确认提交</button>
							</div>
						</div>
					</div>

				</div>
			</form>
			</empty>
		</div>
	</div>

<script src="__ROOT__/Public/Static/js/bootstrap.min.js"></script>
<link href="__ROOT__/Public/Static/bootstrap-datetimepicker/css/datetimepicker.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="__ROOT__/Public/Static/bootstrap-datetimepicker/js/bootstrap-datetimepicker.js" charset="UTF-8"></script>
<script type="text/javascript" src="__ROOT__/Public/Static/bootstrap-datetimepicker/js/locales/bootstrap-datetimepicker.zh-CN.js" charset="UTF-8"></script>
<script type="text/javascript">
$('.form_datetime').datetimepicker({
	language:  'zh-CN',
	weekStart: 1,
	todayBtn:  1,
	autoclose: 1,
	todayHighlight: 1,
	startView: 2,
	forceParse: 0,
	showMeridian: 1,
	pickerPosition: "bottom-left",
});
$('.form_date').datetimepicker({
	language:  'zh-CN',
	weekStart: 1,
	todayBtn:  1,
	autoclose: 1,
	todayHighlight: 1,
	startView: 0,
	forceParse: 0,
	showMeridian: 1,
	pickerPosition: "bottom-left",
});

</script>
<include file="Home@Public:footer" />